
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>config · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="rest.html" />
    
    
    <link rel="prev" href="nirvana.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    概览
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    快速入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../guides/project.html">
            
                <a href="../guides/project.html">
            
                    
                    项目结构和初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../guides/api.html">
            
                <a href="../guides/api.html">
            
                    
                    API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../guides/doc.html">
            
                <a href="../guides/doc.html">
            
                    
                    生成 API 文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../guides/client.html">
            
                <a href="../guides/client.html">
            
                    
                    生成客户端
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    概念
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../concepts/cp.html">
            
                <a href="../concepts/cp.html">
            
                    
                    Consumer && Producer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../concepts/operator.html">
            
                <a href="../concepts/operator.html">
            
                    
                    Operator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../concepts/filter.html">
            
                <a href="../concepts/filter.html">
            
                    
                    Filter
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../concepts/prefab.html">
            
                <a href="../concepts/prefab.html">
            
                    
                    Prefab
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../concepts/modifier.html">
            
                <a href="../concepts/modifier.html">
            
                    
                    Modifier
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../concepts/middleware.html">
            
                <a href="../concepts/middleware.html">
            
                    
                    Middleware
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../concepts/context.html">
            
                <a href="../concepts/context.html">
            
                    
                    Context
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../concepts/source.html">
            
                <a href="../concepts/source.html">
            
                    
                    Parameter Generator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../concepts/destination.html">
            
                <a href="../concepts/destination.html">
            
                    
                    Destination Handler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../concepts/error.html">
            
                <a href="../concepts/error.html">
            
                    
                    错误包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../concepts/method.html">
            
                <a href="../concepts/method.html">
            
                    
                    方法包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../concepts/configurer.html">
            
                <a href="../concepts/configurer.html">
            
                    
                    配置器机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../concepts/plugin.html">
            
                <a href="../concepts/plugin.html">
            
                    
                    插件机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="../concepts/clients.html">
            
                <a href="../concepts/clients.html">
            
                    
                    多客户端整合
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    插件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../plugins/logger.html">
            
                <a href="../plugins/logger.html">
            
                    
                    系统日志插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../plugins/reqlog.html">
            
                <a href="../plugins/reqlog.html">
            
                    
                    请求日志插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../plugins/metrics.html">
            
                <a href="../plugins/metrics.html">
            
                    
                    监控指标插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../plugins/tracing.html">
            
                <a href="../plugins/tracing.html">
            
                    
                    请求追踪插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../plugins/profiling.html">
            
                <a href="../plugins/profiling.html">
            
                    
                    性能分析插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../plugins/version.html">
            
                <a href="../plugins/version.html">
            
                    
                    版本信息插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../plugins/healthcheck.html">
            
                <a href="../plugins/healthcheck.html">
            
                    
                    健康检查插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    框架开发者指南
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="start.html">
            
                <a href="start.html">
            
                    
                    准备工作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="log.html">
            
                <a href="log.html">
            
                    
                    log
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="errors.html">
            
                <a href="errors.html">
            
                    
                    errors
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="definition.html">
            
                <a href="definition.html">
            
                    
                    definition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="method.html">
            
                <a href="method.html">
            
                    
                    definition/method
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="converter.html">
            
                <a href="converter.html">
            
                    
                    operators/converter
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="validator.html">
            
                <a href="validator.html">
            
                    
                    operators/validator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="router.html">
            
                <a href="router.html">
            
                    
                    service/router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="service.html">
            
                <a href="service.html">
            
                    
                    service
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="nirvana.html">
            
                <a href="nirvana.html">
            
                    
                    nirvana
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.11" data-path="config.html">
            
                <a href="config.html">
            
                    
                    config
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="rest.html">
            
                <a href="rest.html">
            
                    
                    rest
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.13" data-path="utils.html">
            
                <a href="utils.html">
            
                    
                    utils
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.14" data-path="command.html">
            
                <a href="command.html">
            
                    
                    cmd/nirvana
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >config</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="config-&#x5305;">config &#x5305;</h1>
<p>config &#x5305;&#x5229;&#x7528; <code>github.com/spf13/cobra</code> &#x548C; <code>github.com/spf13/viper</code> &#x5B9E;&#x73B0;&#x4E86; Nirvana Command &#x548C;&#x914D;&#x7F6E;&#x8BFB;&#x53D6;&#xFF0C;&#x4E3A; Nirvana &#x670D;&#x52A1;&#x542F;&#x52A8;&#x63D0;&#x4F9B;&#x4E86;&#x547D;&#x4EE4;&#x884C;&#x652F;&#x6301;&#x3002;</p>
<p>NirvanaCommand &#x63A5;&#x53E3;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-go"><span class="hljs-comment">// NirvanaCommand is a nirvana command.</span>
<span class="hljs-keyword">type</span> NirvanaCommand <span class="hljs-keyword">interface</span> {
    <span class="hljs-comment">// EnablePlugin enables plugins.</span>
    EnablePlugin(plugins ...Plugin) NirvanaCommand
    <span class="hljs-comment">// AddOption will fill up options from flags/ENV/config after executing.</span>
    <span class="hljs-comment">// A non-empty prefix is recommended. It&apos;s used to divide option namespaces.</span>
    AddOption(prefix <span class="hljs-keyword">string</span>, options ...CustomOption) NirvanaCommand
    <span class="hljs-comment">// Add adds a field by key.</span>
    <span class="hljs-comment">// If you don&apos;t have any struct to describe an option, you can use the method to</span>
    <span class="hljs-comment">// add a single field into nirvana command.</span>
    <span class="hljs-comment">// `pointer` must be a pointer to golang basic data type (e.g. *int, *string).</span>
    <span class="hljs-comment">// `key` must a config key. It&apos;s like &apos;nirvana.ip&apos; and &apos;myconfig.name.firstName&apos;.</span>
    <span class="hljs-comment">// The key will be converted to flag and env (e.g. --nirvana-ip and NIRVANA_IP).</span>
    <span class="hljs-comment">// If you want a short flag for the field, you can only set a one-char string.</span>
    <span class="hljs-comment">// `desc` describes the field.</span>
    Add(pointer <span class="hljs-keyword">interface</span>{}, key <span class="hljs-keyword">string</span>, shortFlag <span class="hljs-keyword">string</span>, desc <span class="hljs-keyword">string</span>) NirvanaCommand
    <span class="hljs-comment">// Execute runs nirvana server.</span>
    Execute(descriptors ...definition.Descriptor) error
    <span class="hljs-comment">// ExecuteWithConfig runs nirvana server from a custom config.</span>
    ExecuteWithConfig(cfg *nirvana.Config) error
    <span class="hljs-comment">// Command returns a command for command.</span>
    Command(cfg *nirvana.Config) *cobra.Command
    <span class="hljs-comment">// SetHook sets nirvana command hook.</span>
    SetHook(hook NirvanaCommandHook)
    <span class="hljs-comment">// Hook returns nirvana command hook.</span>
    Hook() NirvanaCommandHook
}
</code></pre>
<p>NirvanaCommand &#x6269;&#x5C55;&#x4E86; nirvana &#x5305;&#x7684;&#x63D2;&#x4EF6;&#x80FD;&#x529B;&#xFF1A;</p>
<pre><code>// CustomOption must be a pointer to struct.
//
// Here is an example:
//   type Option struct {
//       FirstName string `desc:&quot;Desc for First Name&quot;`
//       Age       uint16 `desc:&quot;Desc for Age&quot;`
//   }
// The struct has two fields (with prefix example):
//   Field       Flag                   ENV                  Key (In config file)
//   FirstName   --example-first-name   EXAMPLE_FIRST_NAME   example.firstName
//   Age         --example-age          EXAMPLE_AGE          example.age
// When you execute command with `--help`, you can see the help doc of flags and
// descriptions (From field tag `desc`).
//
// The priority is:
//   Flag &gt; ENV &gt; Key &gt; The value you set in option
type CustomOption interface{}

// Plugin is for plugins to collect configurations
type Plugin interface {
    // Name returns plugin name.
    Name() string
    // Configure configures nirvana config via current options.
    Configure(cfg *nirvana.Config) error
}
</code></pre><p>Nirvana Command &#x8981;&#x6C42;&#x6BCF;&#x4E2A;&#x63D2;&#x4EF6;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A; Option&#xFF0C;&#x5E76;&#x4E14;&#x5B9E;&#x73B0; Plugin &#x63A5;&#x53E3;&#x3002;&#x7528;&#x6237;&#x5728; Comamnd &#x4E2D;&#x4F20;&#x9012; Option &#x6765;&#x542F;&#x7528;&#x63D2;&#x4EF6;&#xFF0C;&#x5E76;&#x4E14;&#x5C06;&#x63D2;&#x4EF6; Option &#x4E2D;&#x7684;&#x516C;&#x5F00;&#x5B57;&#x6BB5;&#x6839;&#x636E;&#x4E00;&#x5B9A;&#x7684;&#x89C4;&#x5219;&#xFF08;&#x89C4;&#x5219;&#x53C2;&#x8003;&#x4E0A;&#x9762;&#x7684;&#x6CE8;&#x91CA;&#xFF09;&#x4ECE; flag&#xFF0C;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF0C;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x8BFB;&#x53D6;&#x3002;&#x8FD9;&#x6837;&#x53EF;&#x4EE5;&#x65B9;&#x4FBF;&#x7528;&#x6237;&#x901A;&#x8FC7;&#x5916;&#x90E8;&#x9009;&#x9879;&#x6765;&#x6539;&#x53D8;&#x8FD0;&#x884C;&#x65F6;&#x7684;&#x884C;&#x4E3A;&#x3002;</p>
<p>&#x7531;&#x4E8E; Nirvana Config &#x670D;&#x52A1;&#x914D;&#x7F6E;&#x7684;&#x7279;&#x6B8A;&#x6027;&#xFF0C;config &#x5305;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A; Option &#x6765;&#x8868;&#x8FBE;&#x8FD9;&#x4E9B;&#x914D;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-go"><span class="hljs-comment">// Option contains basic configurations of nirvana.</span>
<span class="hljs-keyword">type</span> Option <span class="hljs-keyword">struct</span> {
    <span class="hljs-comment">// IP is the IP to listen.</span>
    IP <span class="hljs-keyword">string</span> <span class="hljs-string">`desc:&quot;Nirvana server listening IP&quot;`</span>
    <span class="hljs-comment">// Port is the port to listen.</span>
    Port <span class="hljs-keyword">uint16</span> <span class="hljs-string">`desc:&quot;Nirvana server listening Port&quot;`</span>
    <span class="hljs-comment">// Key is private key for HTTPS.</span>
    Key <span class="hljs-keyword">string</span> <span class="hljs-string">`desc:&quot;TLS private key (PEM format) for HTTPS&quot;`</span>
    <span class="hljs-comment">// Cert is certificate for HTTPS.</span>
    Cert <span class="hljs-keyword">string</span> <span class="hljs-string">`desc:&quot;TLS certificate (PEM format) for HTTPS&quot;`</span>
}
</code></pre>
<p>&#x9664;&#x4E86;&#x63D2;&#x4EF6; Option &#x4EE5;&#x5916;&#xFF0C;config &#x5305;&#x4F1A;&#x4ECE;&#x4EE5;&#x4E0B;&#x6587;&#x4EF6;&#x5217;&#x8868;&#x4E2D;&#x8BFB;&#x53D6;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1A;</p>
<pre><code>&#x76EE;&#x5F55;&#xFF1A;
  ./
  ./config/
  {ExecutableFilePath}/
  {ExecutableFilePath}/config/
  /etc/nirvana/

&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x540D;&#xFF1A;
  nirvana.yaml
  nirvana.toml
  nirvana.json
</code></pre><p>&#x5982;&#x679C;&#x8BFB;&#x53D6;&#x5230;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x90A3;&#x4E48;&#x9664;&#x4E86;&#x4F7F;&#x7528; Option &#x63A5;&#x6536;&#x914D;&#x7F6E;&#x4EE5;&#x5916;&#xFF0C;&#x8FD8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4E00;&#x4E9B;&#x5E2E;&#x52A9;&#x65B9;&#x6CD5;&#x83B7;&#x53D6;&#x914D;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-go"><span class="hljs-comment">// IsSet checks to see if the key has been set in any of the data locations.</span>
<span class="hljs-comment">// IsSet is case-insensitive for a key</span>
<span class="hljs-keyword">func</span> IsSet(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">bool</span>

<span class="hljs-comment">// Set sets the value for the key in the override regiser.</span>
<span class="hljs-comment">// Set is case-insensitive for a key.</span>
<span class="hljs-comment">// Will be used instead of values obtained via</span>
<span class="hljs-comment">// flags, config file, ENV, default, or key/value store.</span>
<span class="hljs-keyword">func</span> Set(key <span class="hljs-keyword">string</span>, value <span class="hljs-keyword">interface</span>{})

<span class="hljs-comment">// Get can retrieve any value given the key to use.</span>
<span class="hljs-comment">// Get is case-insensitive for a key.</span>
<span class="hljs-comment">// Get has the behavior of returning the value associated with the first</span>
<span class="hljs-comment">// place from where it is set. Viper will check in the following order:</span>
<span class="hljs-comment">// override, flag, env, config file, key/value store, default</span>
<span class="hljs-comment">//</span>
<span class="hljs-comment">// Get returns an interface. For a specific value use one of the Get____ methods.</span>
<span class="hljs-keyword">func</span> Get(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">interface</span>{}

<span class="hljs-comment">// GetBool returns the value associated with the key as a bool.</span>
<span class="hljs-keyword">func</span> GetBool(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">bool</span>

<span class="hljs-comment">// GetDuration returns the value associated with the key as a time.Duration.</span>
<span class="hljs-keyword">func</span> GetDuration(key <span class="hljs-keyword">string</span>) time.Duration

<span class="hljs-comment">// GetFloat32 returns the value associated with the key as a float32.</span>
<span class="hljs-keyword">func</span> GetFloat32(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">float32</span>

<span class="hljs-comment">// GetFloat64 returns the value associated with the key as a float64.</span>
<span class="hljs-keyword">func</span> GetFloat64(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">float64</span>

<span class="hljs-comment">// GetInt returns the value associated with the key as a int.</span>
<span class="hljs-keyword">func</span> GetInt(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">int</span>

<span class="hljs-comment">// GetInt8 returns the value associated with the key as a int.</span>
<span class="hljs-keyword">func</span> GetInt8(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">int8</span>

<span class="hljs-comment">// GetInt16 returns the value associated with the key as a int.</span>
<span class="hljs-keyword">func</span> GetInt16(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">int16</span>

<span class="hljs-comment">// GetInt32 returns the value associated with the key as a int32.</span>
<span class="hljs-keyword">func</span> GetInt32(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">int32</span>

<span class="hljs-comment">// GetInt64 returns the value associated with the key as a int64.</span>
<span class="hljs-keyword">func</span> GetInt64(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">int64</span>

<span class="hljs-comment">// GetString returns the value associated with the key as a string.</span>
<span class="hljs-keyword">func</span> GetString(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">string</span>

<span class="hljs-comment">// GetStringSlice returns the value associated with the key as a []string.</span>
<span class="hljs-keyword">func</span> GetStringSlice(key <span class="hljs-keyword">string</span>) []<span class="hljs-keyword">string</span>

<span class="hljs-comment">// GetUint returns the value associated with the key as a uint.</span>
<span class="hljs-keyword">func</span> GetUint(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">uint</span>

<span class="hljs-comment">// GetUint8 returns the value associated with the key as a uint.</span>
<span class="hljs-keyword">func</span> GetUint8(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">uint8</span>

<span class="hljs-comment">// GetUint16 returns the value associated with the key as a uint.</span>
<span class="hljs-keyword">func</span> GetUint16(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">uint16</span>

<span class="hljs-comment">// GetUint32 returns the value associated with the key as a uint32.</span>
<span class="hljs-keyword">func</span> GetUint32(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">uint32</span>

<span class="hljs-comment">// GetUint64 returns the value associated with the key as a uint64.</span>
<span class="hljs-keyword">func</span> GetUint64(key <span class="hljs-keyword">string</span>) <span class="hljs-keyword">uint64</span>
</code></pre>
<p><strong>&#x6CE8;&#xFF1A;&#x5982;&#x679C;&#x5728; nirvana &#x5305;&#x4E2D;&#x5BF9; Config &#x8FDB;&#x884C;&#x4E86;&#x6269;&#x5C55;&#xFF0C;&#x6D89;&#x53CA;&#x5230;&#x5B57;&#x6BB5;&#x7684;&#x6539;&#x53D8;&#xFF0C;&#x4E5F;&#x9700;&#x8981;&#x5728;&#x8FD9;&#x4E2A;&#x5305;&#x4E2D;&#x4FEE;&#x6539; Option &#x548C;&#x76F8;&#x5E94;&#x7684;&#x529F;&#x80FD;&#x3002;</strong></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="nirvana.html" class="navigation navigation-prev " aria-label="Previous page: nirvana">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="rest.html" class="navigation navigation-next " aria-label="Next page: rest">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"config","level":"1.5.11","depth":2,"next":{"title":"rest","level":"1.5.12","depth":2,"path":"topics/rest.md","ref":"topics/rest.md","articles":[]},"previous":{"title":"nirvana","level":"1.5.10","depth":2,"path":"topics/nirvana.md","ref":"topics/nirvana.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"language":"zh-hans","gitbook":"*"},"file":{"path":"topics/config.md","mtime":"2019-08-06T09:48:58.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-10-20T10:33:16.586Z"},"basePath":"..","book":{"language":"zh-hans"}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

